﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UIAStudio
{
    public class CSUsing
    {
        private List<string> _prefixes =  new List<string>();

        public void Add(string name)
        {
            if (!_prefixes.Contains(name))
            {
                _prefixes.Add(name);
            }
        }

        public override string ToString()
        {
            StringBuilder snippet = new StringBuilder();

            foreach (string prefix in _prefixes)
            {
                string stmt = String.Format("using {0};", prefix);
                snippet.AppendLine(stmt);
            }
            return snippet.ToString();
        }
    }
}
